<?php
/**
 * @version:		$Id: index.php 8 2011-08-02 23:17:34Z epatarroyo $
 * @copyright:		Copyright (C) 2010 OpenWeb Software. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;
?>
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <jdoc:include type="head" />
  <link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0-alpha.1/jquery.mobile-1.2.0-alpha.1.min.css" />
  <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/mobile.css" />
  <script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
  <script src="http://code.jquery.com/mobile/1.2.0-alpha.1/jquery.mobile-1.2.0-alpha.1.min.js"></script>
  <script src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/js/mobile.js"></script>
  <?php if($googleAnalitycs != ""){ ?>
  <script type="text/javascript">
    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', '<?php echo $googleAnalitycs; ?>']);
    _gaq.push(['_trackPageview']);
    (function() {
      var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
      ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    })();
  </script>
  <?php } ?>
</head>
<body>
  <div data-role="page" data-theme="<?php echo $mobileGlobalTheme; ?>" id="wrapper">
    <div data-theme="<?php echo $mobileHeader1Theme; ?>" data-role="header" <?php if($mobileFixedHeader) echo "data-position=\"fixed\" ";?>id="header1">
      <div data-role="navbar" data-iconpos="top">
        <ul>
          <li><a href="/" data-theme="<?php echo $mobileNavBarTheme; ?>" data-icon="home">Home</a></li>
          <li><a href="sitemap.html" data-theme="<?php echo $mobileNavBarTheme; ?>" data-icon="grid">Sitemap</a></li>
          <li><a href="info.html" data-theme="<?php echo $mobileNavBarTheme; ?>" data-icon="info">Info</a></li>
          <li><a href="search.html" data-theme="<?php echo $mobileNavBarTheme; ?>" data-icon="search">Search</a></li>
        </ul>
      </div>
    </div>
    
    <div data-theme="<?php echo $mobileHeader2Theme; ?>" data-role="header"  id="header2">
      <div id="logo"><a href="<?php echo $this->baseurl ?>"><img src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/images/logo.png" alt="<?php echo JText::_('TPL_OPENWEB_LOGO_ALT'); ?>" /></a></div>
      <?php if ($this->countModules('tagline')) : ?>
      <div id="tagline"><jdoc:include type="modules" name="tagline" style="none" /></div>
      <?php endif; ?>
    </div>

    <div data-role="content" id="content">
      
      <?php if ($this->countModules( 'm-breadcrumbs' )) : ?>
      <div id="breadcrumbs"><jdoc:include type="modules" name="m-breadcrumbs" style="none" /></div>
      <?php endif; ?>

      <?php if ($this->countModules( 'm-nav01' )) : ?>
      <div data-role="collapsible-set" data-theme="<?php echo $mobileCollapsibleSetTheme; ?>" data-content-theme="<?php echo $mobileCollapsibleContentTheme; ?>">
        <jdoc:include type="modules" name="m-nav01" style="mobile" />
      </div>
      <?php endif; ?>

      <?php if ($this->countModules( 'm-top' )) : ?>
      <jdoc:include type="modules" name="m-top" style="xhtml1" />
      <?php endif; ?>

      <div id="component"><jdoc:include type="component" /></div>

      <?php if ($this->countModules( 'm-bottom' )) : ?>
      <jdoc:include type="modules" name="m-bottom" style="xhtml1" />
      <?php endif; ?>

    </div>

    <?php if ($this->countModules( 'm-footer1' )) : ?>
    <div data-theme="<?php echo $mobileFooter1Theme; ?>" data-role="footer" id="footer1">
      <jdoc:include type="modules" name="m-footer1" style="xhtml1" />
    </div>
    <?php endif; ?>

    <?php if ($this->countModules( 'm-footer2' )) : ?>
    <div data-theme="<?php echo $mobileFooter2Theme; ?>" data-role="footer" <?php if($mobileFixedFooter) echo "data-position=\"fixed\" ";?>id="footer2">
      <jdoc:include type="modules" name="m-footer2" style="xhtml1" />
    </div>
    <?php endif; ?>

  </div>
</body>
</html>